package org.lboot.flow.module.audit;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.lboot.jpa.jpa.AbstractJpaCurdExt;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
@AllArgsConstructor
public class FlowAuditServiceImpl extends AbstractJpaCurdExt<String,FlowAudit,FlowAuditDAO> implements FlowAuditService{
    @Override
    public void deleteByFlowWorkId(String flowWorkId) {
        dao.deleteByFlowWorkId(flowWorkId);
    }

    @Override
    public List<FlowAudit> getByFlowWorkId(String flowWorkId) {
        return dao.findByFlowWorkId(flowWorkId);
    }

    @Override
    public List<FlowAudit> getByFlowIds(List<String> flowIds) {
        return dao.findByFlowWorkIdIn(flowIds);
    }
}
